<template>
  <div class="day">
    <div class="box">
      <span class="dayC">{{data}}</span>
    </div>
    <div class="bg" :class="over?'over':''"></div>
  </div>
</template>

<script>
export default {
  name: "day",
  props: {
    data: {
      day: String,
      over:true
    }
  },
  data() {
    return {};
  },
  mounted() {
    console.log(this.data);
  }
};
</script>

<style lang="less" scoped>
.day {
  position: relative;
  overflow: hidden;
  width: 100px;
  height: 100px;
  border: 1px solid #a2a3a4;
  .bg {
    width: 200%;
    height: 200%;
    transform: rotate(-45deg) translate(98px, -90px);
    transform-origin: center center;
    background-color: antiquewhite;
    position: absolute;
    z-index: 0;
    &.over{
      background-color:burlywood;
    }
  }
  .box {
    position: absolute;
    z-index: 9;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;

    .dayC {
      font-weight: bold;
      font-size: 20px;
      width: 40px;
      height: 40px;
      display: inline-block;
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }
}
</style>
